#!/bin/bash

# Test node failure just after format

. ./common

for i in `seq 0 7`; do
    _start_sheep $i
done

_wait_for_sheep 8

$DOG cluster format &

for i in `seq 5 7`; do
    _kill_sheep $i
done

# wait for dog to finish
wait

for i in `seq 5 7`; do
    _start_sheep $i
done

_wait_for_sheep "8"

for i in `seq 0 7`; do
    $DOG cluster info -p 700$i | head -1
    $DOG node list -p 700$i
done
